<script setup>
import {reactive} from "vue";
import {message} from "ant-design-vue";



// console.log(props.deptObj_props);

let deptObj = reactive({});
deptObj.dept_name = ''
deptObj.dept_info = '';


let emit=defineEmits(["addInfo"]);
function addInfo(){
  if(deptObj.dept_name===""){
    message.warn("请输入部门名称");
    return
  }
  emit("addInfo", deptObj);
}
</script>

<template>
  <a-row style="margin-bottom: 10px">
    <a-col :span="4">
      部门名称
    </a-col>
    <a-col :span="20">
      <a-input v-model:value="deptObj.dept_name"></a-input>
    </a-col>
  </a-row>
  <a-row style="margin-bottom: 10px">
    <a-col :span="4">
      部门介绍
    </a-col>
    <a-col :span="20">
      <a-textarea v-model:value="deptObj.dept_info" placeholder="请输入部门介绍" :rows="10"/>
    </a-col>
  </a-row>
  <div style="text-align: right">
    <a-button type="primary" @click="addInfo">确 定</a-button>
  </div>
</template>

<style scoped>

</style>